/*
 * borderFrmWin.java
 *
 * Created on __DATE__, __TIME__
 */

package com.attlax.swing;

import java.awt.Color;
import java.awt.Container;
import java.awt.Dimension;

import javax.swing.BorderFactory;
import javax.swing.ImageIcon;
import javax.swing.JLayeredPane;
import javax.swing.JPanel;
import javax.swing.SpringLayout;

import com.attilax.io.pathx;

/**
 *  
 * @author  __USER__
 */
public class JFrameAti extends javax.swing.JFrame {
	SpringLayout sprLayout = new SpringLayout();
	/** Creates new form borderFrmWin */
	public JFrameAti() {
		this.setUndecorated(true);
		
		this.setLayout(sprLayout);
	 	
	 	//this.setLocation(p)
	//	  this.setSize(new Dimension(1000,650));
		initComponents();
	
		
		//set outter boder 
		this.getRootPane().setBorder(
				BorderFactory.createLineBorder(new Color(48, 187, 227), 1));
		JLayeredPane layeredPane = this.getLayeredPane();	
		layeredPane.setBorder(BorderFactory.createLineBorder(Color.black, 1));
		// can show  outter boder  
		Container contentPane = this.getContentPane();
		((JPanel) contentPane).setOpaque(false);//jeig must yeu in customed broder mode
	

	
		//jPanel2out.setBounds(this.getContentPane().getBounds());
		this.setBounds(100,100,700,500)   ;//jeig set size and location
	}

	/** This method is called from within the constructor to
	 * initialize the form.
	 * WARNING: Do NOT modify this code. The content of this method is
	 * always regenerated by the Form Editor.
	 */
	//GEN-BEGIN:initComponents
	// <editor-fold defaultstate="collapsed" desc="Generated Code">
	private void initComponents() {

		
		jPanel2out = new javax.swing.JPanel();
		jPanel2out.setBackground(new java.awt.Color(153, 153, 153));
		jPanel2out.setBorder(BorderFactory.createLineBorder(new Color(48, 187,
				227), 1));
		 //jPanel2out.setSize(600, 400); not need case springlayount
		//jPanel2out.setLocation(0, 0);
		 sprLayout.putConstraint(SpringLayout.WEST,  jPanel2out, 1,
			      SpringLayout.WEST,  this.getContentPane());
		 sprLayout.putConstraint(SpringLayout.EAST,  jPanel2out, -1,
				      SpringLayout.EAST,  this.getContentPane());
		 sprLayout.putConstraint(SpringLayout.SOUTH,  jPanel2out, -1,
			      SpringLayout.SOUTH,  this.getContentPane());
		 sprLayout.putConstraint(SpringLayout.NORTH,  jPanel2out, 29,
			      SpringLayout.NORTH,  this.getContentPane());
		 jPanel2out.setLayout(sprLayout);
		this.add(jPanel2out);
		
		
		//add title
		jLabel1 = new javax.swing.JLabel();
	//	jLabel1.sets
	 	jLabel1.setIcon(new ImageIcon(getClass().getResource(
	 			"/com/attlax/swing/skin/title.jpg")));
		jLabel1.setText("title......................................................................title........................................................");
 	 sprLayout.putConstraint(SpringLayout.WEST,  jLabel1, 1,
 			      SpringLayout.WEST,  this.getContentPane());
 		 sprLayout.putConstraint(SpringLayout.EAST,  jLabel1, -1,
 			      SpringLayout.EAST,  this.getContentPane());
//		
 	 sprLayout.putConstraint(SpringLayout.NORTH,  jLabel1, 1,
 			      SpringLayout.NORTH,  this.getContentPane());
 		 sprLayout.putConstraint(SpringLayout.SOUTH,  jLabel1, 30,
 			      SpringLayout.NORTH,  this.getContentPane());
		this.add(jLabel1);
	
		//----------add jpin 
		jPanel2_in = new javax.swing.JPanel();
		jPanel2_in.setBackground(Color.white);
		jPanel2_in.setBorder(BorderFactory.createLineBorder(Color.black, 1));
		jPanel2out.setLayout(sprLayout);
		 sprLayout.putConstraint(SpringLayout.WEST,  jPanel2_in, 0,
			      SpringLayout.WEST, jPanel2out);
		 sprLayout.putConstraint(SpringLayout.EAST,  jPanel2_in, 0,
				      SpringLayout.EAST, jPanel2out);
		
		 sprLayout.putConstraint(SpringLayout.SOUTH,  jPanel2_in, 0,
			      SpringLayout.SOUTH,  jPanel2out);
		 sprLayout.putConstraint(SpringLayout.NORTH,  jPanel2_in, 0,
			      SpringLayout.NORTH,  jPanel2out);
		 
		jPanel2out.add(jPanel2_in);
		
		
		

		setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

	

	 
	 

		 
	 
  
	//	pack();
	}// </editor-fold>
	//GEN-END:initComponents

	/**
	 * @param args the command line arguments
	 */
	public static void main(String args[]) {
		java.awt.EventQueue.invokeLater(new Runnable() {
			public void run() {
				new JFrameAti().setVisible(true);
			}
		});
		System.out.println(Integer.MAX_VALUE);
	}

	
	
	public void add()
	{
		
	}
	//GEN-BEGIN:variables
	// Variables declaration - do not modify
	private javax.swing.JLabel jLabel1;
	private javax.swing.JPanel jPanel2_in;
	private javax.swing.JPanel jPanel2out;
	// End of variables declaration//GEN-END:variables

}